﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EvidenceManagement.Logic.Security
{
    /// <summary>
    /// Applied to controls as an indication that user must possess 
    /// rights to see/act on this control
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class AccessControlAction : System.Attribute
    {
        readonly string actionName = null;
        readonly string actionDescription;
                
        public AccessControlAction(string actionName)
        {
            this.actionName = actionName;            
        }

        public AccessControlAction(string actionName, string actionDescription)
            :this(actionName)
        {
            this.actionDescription = actionDescription;
        }
        
        public string ActionName
        {
            get { return actionName; }
        }

        public string ActionDescription
        {
            get { return actionDescription; }
        }
    }
}
